package com.doraemon.module.buyer.entity;

import com.doraemon.enums.OrderStateEnum;
import com.doraemon.enums.PayStateEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单
 *
 * @author doraemon
 * @date 2017/9/12
 */
@Entity
@Data
@DynamicUpdate
public class OrderMaster {
    /**订单ID.*/
    @Id
    private String orderId;
    /**下单人姓名.*/
    private String buyerName;
    /**下单人电话.*/
    private String buyerPhone;
    /**下单人住址.*/
    private String buyerAddress;
    /**买家微信openid.*/
    private  String buyerOpenid;
    /**订单总金额.*/
    private BigDecimal orderAmount;
    /**订单状态, 默认为新下单.*/
    private Integer orderStatus = OrderStateEnum.NEW.getCode();
    /**'支付状态, 默认未支付.*/
    private Integer payStatus = PayStateEnum.WAIT.getCode();

    private Date createTime;

    private Date updateTime;
}
